package Reproductor;



import java.io.File;
import javax.swing.*;
import javax.swing.filechooser.*;


public class ImageFilter extends FileFilter {

    //Accept all directories and all mp3, wav files.
    @Override
    public boolean accept(File f) {
        if (f.isDirectory()) {
            return true;
        }

        String extension = Utils.getExtension(f);
        if (extension != null) {
            if (extension.equals(Utils.mp3) || extension.equals(Utils.wav) ) {
                return true;
            } 
            else {
                return false;
            }
        }

        return false;
    }

    //The description of this filter
    @Override
    public String getDescription() {
        return "Solo mp3 wav";
    }
}
